package com.zheng.pojo;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

/**
 *  @author: zheng
 *  @Date: 2020-06-11 17:19
 *  @Description: 封装Handler方法
 */
public class Handler {

    private Object object;

    private Method method;

    private Pattern pattern;

    private Map<String,Integer> parameterIndex;

    private String methodSecurityName;//方法访问权限

    private String classSecurityName;//类访问权限

    public Handler(Object object, Method method, Pattern pattern,String classSecurityName,String methodSecurityName) {
        this.object = object;
        this.method = method;
        this.pattern = pattern;
        parameterIndex=new HashMap<>();
        this.methodSecurityName=methodSecurityName;
        this.classSecurityName=classSecurityName;
    }

    public String getMethodSecurityName() {
        return methodSecurityName;
    }

    public void setMethodSecurityName(String methodSecurityName) {
        this.methodSecurityName = methodSecurityName;
    }

    public String getClassSecurityName() {
        return classSecurityName;
    }

    public void setClassSecurityName(String classSecurityName) {
        this.classSecurityName = classSecurityName;
    }

    public Map<String, Integer> getParameterIndex() {
        return parameterIndex;
    }

    public void setParameterIndex(Map<String, Integer> parameterIndex) {
        this.parameterIndex = parameterIndex;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }
}
